<!--内容开始-->
<section class="content">
    <div class="search">
        <form class="form-inline">
            <e>邮件采用SMTP方式发送</e>
        </form>
    </div>
    <!--数据表开始-->
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <!-- /.box-header -->
                    <div class="box-body no-padding">
                        <form method="post" action="{:url('emailPost')}">
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">服务器</label>
                                    <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="smtp_server" class="form-control" placeholder="SMTP服务器"
                                               value="{$info.smtp_server}">
                                    </div>
                                </div>
                            </div>
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">SMTP端口</label>
                                    <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="smtp_port" class="form-control" placeholder="SMTP端口"
                                               value="{$info.smtp_port}">
                                    </div>
                                </div>
                            </div>
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">发件人</label>
                                    <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="email_id" class="form-control" placeholder="发件人"
                                               value="{$info.email_id}">
                                    </div>
                                </div>
                            </div>
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">发件邮箱</label>
                                    <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="smtp_user" class="form-control" placeholder="发件邮箱"
                                               value="{$info.smtp_user}">
                                    </div>
                                </div>
                            </div>
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">身份验证码</label>
                                    <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
                                        <input type="password" name="smtp_pwd" class="form-control" placeholder="身份验证码"
                                               value="{$info.smtp_pwd}">
                                    </div>
                                </div>
                            </div>
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">测试邮箱</label>
                                    <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
                                        <input type="text" name="test_eamil" class="form-control" placeholder="测试邮箱"
                                               value="{$info.test_eamil}">
                                    </div>
                                </div>
                            </div>
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <div class="col-xs-12 col-sm-8 col-md-6 col-lg-5">
                                        <label class="text-lable">测试邮件内容</label>
                                        <textarea class="form-control" name="test_eamil_info" rows="3"
                                                  placeholder="测试邮件内容">{$info.test_eamil_info}</textarea>
                                    </div>
                                </div>
                            </div>
                            <!---->
                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <div class="col-xs-12 col-sm-8 col-md-6 col-lg-5 text-center">
                                        <button type="submit" class="btn btn-flat btn-primary ">提 交</button>
                                        <button type="reset" class="btn btn-flat btn-default">重置</button>
                                        <button type="button" id="test_email" class="btn btn-flat btn-info ">测试发送
                                        </button>
                                    </div>

                                </div>
                            </div>
                            <!---->
                        </form>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </div>
        </div>
    </div>
    <!--数据表结束-->
</section>

<!--内容结束-->
<script type="text/javascript">
    $("#test_email").click(function () {
        var url = "{:url('trySend')}";
        var email = $("input[name='test_eamil']").val();
        trySend(url, email);
    })
</script>